package 函数式编程

object HeightFunctionDemo {
  def main(args: Array[String]): Unit = {
    def minusxy(x: Int) = {
      (y: Int) => x - y
    }

    val f1 = minusxy(3)
    println("f1的类型=" + f1)
    println(f1(1))
    println(f1(9))

    //一步到位,柯里化
    println(minusxy(3)(9))
  }

}
